package cc.yugu.yhdw.webserver.web.controller.security.basic;

import cc.yugu.yhdw.common.annotation.ViewModel;
import cc.yugu.yhdw.common.domain.basic.DepositOrder;
import cc.yugu.yhdw.common.entity.json.PageResult;
import cc.yugu.yhdw.webserver.service.basic.DepositOrderService;
import cc.yugu.yhdw.webserver.web.controller.security.SecurityController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
/**
 * 充值订单控制器
 * 
 * @Date:Created in 2018/7/23 11:28
 * @Author:
 * @Modified By: zjn 2018/7/23 11:28
 */ 
@Controller
@RequestMapping(value = "/security/basic/deposit_order")
public class DepositOrderController extends SecurityController {

    @Autowired
    DepositOrderService depositOrderService;

    @RequestMapping(value = "index.htm")
    public void index(Model model) {
    }
    /**
    * 分页查询客户充值信息
    * 
    * @Param: [search]
    * @Return: cc.yugu.yhdw.common.entity.json.PageResult
    * @Author By: zjn 2018/7/23  11:28
    */ 
    @RequestMapping("page.htm")
    @ViewModel(ViewModel.JSON)
    @ResponseBody
    public PageResult page(DepositOrder search) {
        return PageResult.successResult(depositOrderService.findPage(search));
    }
    /**
    * view_deposit_order.htm页面获取 分页查询信息 并展示
    * 
    * @Param: [model, customerId]
    * @Return: void
    * @Author By: zjn 2018/7/23  11:41
    */ 
    @ViewModel(ViewModel.INNER_PAGE)
    @RequestMapping(value = "view_deposit_order.htm")
    public void viewDepositOrder(Model model, int customerId){
        model.addAttribute("customerId", customerId);
    }


}
